<template>
  <el-dialog
    title="分享"
    :visible.sync="dialogVisible"
    width="460px"
    :modal-append-to-body="false"
    class="specialList_dialog"
    @close="$emit('change',false)"
  >
    <el-form label-position="top" class="specialList_form" label-width="80px" :model="shareForm">
      <el-form-item label="分享链接">
        <el-input v-model="shareForm.name" readonly />
      </el-form-item>
      <el-form-item label="活动区域">
        <div slot="label" flex>
          <el-checkbox v-model="shareForm.checked">提取密码</el-checkbox>
          <!-- <el-checkbox v-model="shareForm.checked">提取密码</el-checkbox> -->
        </div>
        <el-input v-model="shareForm.region" readonly />
      </el-form-item>
      <el-form-item label="有效日期">
        <el-select v-model="shareForm.type">
          <el-option label="1天" value="1天">1天</el-option>
          <el-option label="3天" value="3天">3天</el-option>
          <el-option label="7天" value="7天">7天</el-option>
        </el-select>
        <!-- <el-input v-model="shareForm.type" /> -->
      </el-form-item>
      <div class="line" />
      <div flex="main:right">
        <el-button type="primary" size="small">复制链接及密码</el-button>
      </div>
    </el-form>
  </el-dialog>
</template>

<script>
export default {
  model: {
    prop: 'show',
    event: 'change'
  },
  props: {
    show: Boolean
  },
  data() {
    return {
      dialogVisible: false,
      shareForm: {
        name: 'https://hw2v1ka2d2.feishu.cn/drive/home/',
        region: 'DJI345',
        type: '7天',
        checked: false
      }
    }
  },

  watch: {
    show: {
      handler(newVal) {
        this.dialogVisible = newVal
      },
      immediate: true
    }
  }
}
</script>

<style>

</style>
